B06 - Lottery
https://atcoder.jp/contests/tessoku-book/tasks/tessoku_book_ce
提出
code: python
n = int(input())
a = list(map(int, input().split()))
q = int(input())
lr = list(map(int, input().split())) for _ in range(q)
atari = 0
hazure = 0
for v in a:
if v == 0:
atari.append(atari-1)
hazure.append(hazure-1 + 1)
else:
atari.append(atari-1 + 1)
hazure.append(hazure-1)
for l, r in lr:
ra = atarir - ataril-1
rh = hazurer - hazurel-1
if ra > rh:
print("win")
elif ra == rh:
print("draw")
else:
print("lose")